//
//  DepoistHintCell.swift
//  d11
//
//  Created by peale on 2018/10/20.
//  Copyright © 2018年 Tech_001. All rights reserved.
//

import UIKit

class DepoistHintCell: UITableViewCell {
    var caveatImgView :UIImageView?
    var titleLabel : UILabel?
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.setUpUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    func setUpUI() -> Void {
        self.backgroundColor  = UIColor.white
        self.selectionStyle = UITableViewCell.SelectionStyle.none
        
        self.caveatImgView = UIImageView.init()
        self.caveatImgView?.image = imageNamed("icon_depoist_caveat_hint")
        self.contentView.addSubview(self.caveatImgView!)
        self.caveatImgView?.snp.makeConstraints{(make) in
            make.left.equalToSuperview().offset(12)
            make.width.equalTo(12)
            make.height.equalTo(12)
            make.centerY.equalToSuperview()
        }
        
        self.titleLabel = UILabel.init()
        self.titleLabel?.text = "温馨提示:微信扫码单笔存款最低限额50元,最高限额3000元,\n如若存款金额较大请您选择其他方式,祝您游戏愉快"
        self.titleLabel?.textColor = UIColor.red
        self.titleLabel?.numberOfLines = 2
        self.titleLabel?.textAlignment = .left
        self.titleLabel?.font = UIFont.systemFont(ofSize: 10)
        self.contentView.addSubview(self.titleLabel!)
        self.titleLabel?.snp.makeConstraints{(make) in
            make.width.equalToSuperview().offset(-40)
            make.left.equalTo((caveatImgView?.snp.right)!).offset(6)
            make.height.equalToSuperview()
        }
    }
    
    func setData(content:String) -> Void {
        self.titleLabel?.text = content
    }
}
